The present invention relates to electronic systems operable under program control to create and edit electronic documents.
A conventional feature of computer program applications that create and edit documents is an undo command. Applications written for the Microsoft® Windows 95 operating system often use Ctrl-Z as a keyboard shortcut for the undo command.
One mechanism for implementing undo in applications is based on a command object that knows how to do, undo, and redo an operation. This is described, for example, in Gamma et al., Design Patterns, Addison-Wesley Publishing Co., © 1995, pages 233 to 242. Multiple undo may then be implemented by keeping a command history. Gamma notes on page 239 that such an implementation has a strong potential for error accumulation and recommends using the “memento” pattern as part of the command object. Some applications provide a user with a list of the most recent actions and allow the user to select one of the actions, thereby undoing the selected action and all actions above it (that is, all more recent actions) in the list.
A related feature available in some applications allows a user to save a document that is being edited and later revert to the saved version, thereby discarding intervening changes to the document.
The conventional behavior of an undo command restores the document to the state it had before the operation being undone was done.